Script: --on windowEvent wdID,wdName,objNo,objName,objValue¬Global gIssueVariationsList¬global gWindowPositions¬¬---------------------¬-- This is window #23¬---------------------¬¬if objValue="Open" then ¬ wsSet wdID,"IssueVariationsList","Text", gIssueVariationsList¬ ¬ -- Restore old window position¬ put OldWindowPosition(23) into windowRect¬ if windowRect = empty then centerWindow wdName¬ else wsSet wdID,"0","Rect",windowRect¬ ¬ get "Remove_Disabled:True" & return & "Abbreviation_Disabled:True" & "IssueVariation_Disabled:True" & return¬ wsSet wdID,0,"Properties",it¬ ¬else if objValue="Close" then ¬ -- save the window position¬ put "23" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 23 of gWindowPositions¬ ¬else if objValue="Suspend" then ¬ ¬else if objValue="Resume" then ¬ ¬else if objValue="CloseBox" then ¬ ¬else if objValue="ZoomBox" then ¬ ¬else if objValue="GrowBox" then ¬ ¬else if objValue="TitleBar" then ¬ ¬end if¬¬--end windowEvent
ItemType: PUSH
Rect: 306,125,386,145
AutoSize: FALSE
Name: Save
AutoClose: TRUE
Balloon: Click here to save your changes to the list of issue variations.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global gIssueVariationsList¬¬put wsGet(wdID,"IssueVariationsList","Text") into gIssueVariationsList¬set the itemDelimiter to tab¬put 1 into tempCnt¬repeat with x = 1 to the number of lines of gIssueVariationsList¬ put line tempCnt of gIssueVariationsList into theLine¬ if item 1 of theLine = empty or item 2 of theLine = empty then delete line tempCnt of gIssueVariationsList¬ else¬ add 1 to tempCnt¬ end if ¬end repeat¬--end mouseUp¬
ItemType: PUSH
Rect: 306,154,386,174
Name: Cancel
CancelItem: TRUE
AutoClose: TRUE
Balloon: Click here to exit without saving your changes to the issue variations list.
ItemType: LIST
Rect: 10,49,288,179
TextFont: Geneva
Name: IssueVariationsList
Style: ListWithTabs...
StyleInfo: .......................>
Logic: Drag
Text: Autographed Aut¬Collector’s Set CS¬Deluxe Edition Dlx¬Direct Market Special Edition DM¬Gold Edition GO¬Limited Edition LE¬Platinum Edition PL¬Silver Edition SI¬Special Cover SC¬Variation A A¬Variation B B¬Variation C C¬Variation D D¬Variation E E¬Variation F F¬Variation G G¬Variation H H¬Variation I I¬Variation J J¬Variation K K¬Variation L L¬Variation M M
Balloon: This is the list of all issue variations and their respective abbreviations.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"IssueVariationsList","Selection") into IssueVariationLine¬put wsGet(wdID,"IssueVariationsList","Text") into IssueVariationsList¬put line IssueVariationLine of IssueVariationsList into theLine¬¬if theLine <> empty then¬ set the itemDelimiter to tab¬ put item 1 of theLine into theIssueVariationName¬ put item 2 of theLine into theIssueVariationAbbreviation¬ put "IssueVariation_Selection:0,100" into theSelection¬ ¬ get "IssueVariation_Disabled:False" & return & "Abbreviation_Disabled:False" & return & "IssueVariation_Text:" & theIssueVariationName & return & "Abbreviation_Text:" & theIssueVariationAbbreviation & return & theSelection & return & "Remove_Disabled:False" & return¬else¬ get "Remove_Disabled:True" & return & "IssueVariation_Text:" & return & "IssueVariation_Disabled:True" & return & "Abbreviation_Disabled:True" & return & "Abbreviation_Text:" & return & "IssueVariation_Selection:0,0" & return ¬ ¬end if¬wsSet wdID,"0", "Properties", it¬--end mouseUp¬
ItemType: TEXT
Rect: 10,24,194,46
TextFont: Geneva
TextSize: 12
Disabled: TRUE
Name: IssueVariation
LockText: FALSE
KeyFilter: bOnly25Chars
Balloon: Enter the description of type of issue variation here. ¬¬Issue variations are the different editions that a single comic issue may appear in. For example, “Gold” or “Collector’s Set” editions may appear in addition to the regular newsstand edition.
Script: --on closeField wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"IssueVariation","Text") into theIssueVariation¬put wsGet(wdID,"IssueVariationsList","Selection") into theIssueVariationLine¬put empty into theProps¬if theIssueVariation <> empty then¬ put wsGet(wdID,"IssueVariationsList","Text") into theIssueVariationsList¬ set the itemDelimiter to tab¬ ¬ put line theIssueVariationLine of theIssueVariationsList into theLine¬ if the number of items of theLine > 1 then put item 2 of theLine into item2¬ else put empty into item2¬ ¬ put theIssueVariation & tab & item2 into line theIssueVariationLine of theIssueVariationsList¬ wsSet wdID,"IssueVariationsList","Text",theIssueVariationsList¬ put "Remove_Disabled:False" & return into theProps¬end if¬put "IssueVariationsList_Selection:" & theIssueVariationLine & return & theProps into theProps¬¬wsSet wdID,"0","Properties", theProps¬--end closeField
ItemType: TEXT
Rect: 200,24,273,46
TextFont: Geneva
TextSize: 12
Disabled: TRUE
Name: Abbreviation
LockText: FALSE
KeyFilter: bOnly4Chars
Balloon: This is the issue variation’s abbreviation. This is what appears in price lists, although it is converted to the longer form when issue labels are printed.¬¬Only letters may be used for the abbreviation.
Script: --on closeField wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"IssueVariationsList","Selection") into theIssueVariationLine¬put wsGet(wdID,"IssueVariationsList","Text") into theIssueVariationsList¬set the itemDelimiter to tab¬put wsGet(wdID,"Abbreviation","Text") into theIssueVariationAbbrev¬put item 2 of line theIssueVariationLine of theIssueVariationsList into oldAbbreviation¬¬if theIssueVariationAbbrev <> empty then¬ put find(GetColumn(theIssueVariationsList,2,2,tab),theIssueVariationAbbrev,"Line","Exact") into whereFound¬ if whereFound = theIssueVariationLine then put find(GetColumn(theIssueVariationsList,2,2,tab),theIssueVariationAbbrev,"Line","Exact",whereFound + 1) into whereFound¬ if whereFound > 0 then¬ beep¬ wsSet wdID,"Abbreviation","Text",oldAbbreviation¬ get windowScript("Stop Alert","That abbreviation is already being used. Please choose another.")¬ else¬ put line theIssueVariationLine of theIssueVariationsList into theLine¬ put (item 1 of theLine) & tab & theIssueVariationAbbrev into line theIssueVariationLine of theIssueVariationsList¬ wsSet wdID,"IssueVariationsList","Text", theIssueVariationsList¬ end if¬else¬ beep¬ wsSet wdID,"Abbreviation","Text",oldAbbreviation¬ get windowScript("Stop Alert","You must enter an abbreviation for this issue variation. (Click “Remove” if you wish to remove this variation entirely).")¬end if¬get "IssueVariationsList_Selection:" & theIssueVariationLine & return & "New_Disabled:False" & return¬wsSet wdID,"0","Properties", it¬--end closeField
ItemType: TEXT
Rect: 14,11,100,23
TextFont: Geneva
TextSize: 9
Name: IssueVariationLabel
WhiteColor: -8739,-8739,-8739
TextStyle: Bold
Text: Issue Variation
ItemType: TEXT
Rect: 201,11,275,23
TextFont: Geneva
TextSize: 9
Name: AbbrevLabel
WhiteColor: -8739,-8739,-8739
TextStyle: Bold
Text: Abbreviation
ItemType: PUSH
Rect: 306,53,386,73
Name: New
Balloon: Click here to add a new issue variation to the list.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"IssueVariationsList","Text") into theList¬¬if theList = empty then put tab after theList¬else put return & tab after theList¬¬put the number of lines of theList into newSelection¬¬wsSet wdID,"IssueVariationsList","Text",theList¬get "IssueVariation_Disabled:False" & return & "Abbreviation_Disabled:False" & return & "IssueVariationsList_Selection:" & newSelection & return & "IssueVariation_Text:" & return & "Abbreviation_Text:" & return & "IssueVariation_Selection:0,0" & return¬wsSet wdID,"0", "Properties", it¬--end mouseUp
ItemType: PUSH
Rect: 306,82,386,102
Disabled: TRUE
Name: Remove
Balloon: Click here to remove the selected abbreviation from the list.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬put wsGet(wdID,"IssueVariationsList","Selection") into theLine¬put wsGet(wdID,"IssueVariationsList","Text") into theList¬delete line theLine of theList¬¬wsSet wdID,"IssueVariationsList","Text",theList¬¬set the itemDelimiter to tab¬put item 1 of line theLine of theList into theIssueVariation¬put item 2 of line theLine of theList into theAbbreviation¬get "IssueVariationsList_Selection:" & theLine & return & "IssueVariation_Text:" & theIssueVariation & return & "Abbreviation_Text:" & theAbbreviation & return¬¬if line theLine of theList <> empty then¬ put "Remove_Disabled:False" & return & "Abbreviation_Selection:0,100" & return after it¬else¬ put "Remove_Disabled:True" & return & "IssueVariation_Disabled:True" & return & "Abbreviation_Disabled:True" & return after it¬end if¬¬wsSet wdID,"0", "Properties", it¬¬--end mouseUp